// 动态js
var $scope = null;
$(function() {
	var appElement = document.querySelector('[ng-controller=main]');
	$scope = angular.element(appElement).scope();
	var dynamicId = locationHref("dynamicId");
	$scope.dynamicId=dynamicId;
	  initialPage($scope);
	$scope.methods.dynamic();
	  
});
// 初始化值
function initialPage($scope) {
	
	
}
var mainApp = angular.module("mainApp", []);
mainApp.controller('main', function($scope) {
	$scope.search={};
	$scope.methods = {
		//动态列表
		dynamic : function() {
			$.ajax({
			    url:$.shysUrlPrefix+'/website/dynamic/'+$scope.dynamicId,
			    type:'get',
			    dataType:'JSON',
				async:true,  //同步方式发起请求
			    success:function (data) {
					if (data.data != null) {
					   $scope.dynamicData = data.data;	//
					    $scope.dynamicFile=data.data.files?data.data.files.split(','):"";
					   $scope.$apply();
					    document.getElementById("targetElement").innerHTML = data.data.dynamicContent;
					} else {
					   
					}
					
			    },
			
			})
		},
		
	};
});











